var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    deadline: "",
    child_num: 0,
    settle_statistic: 0,
    performance_total: 0,
    stage_performance: 0,
    people_num: 0,
    valid_user_num: 0,
    is_admin: 0,
    activity: {
      activity_name:"",
      sign_profit:0,
      recommend_award:0,
      manage_award:0,
      people_num:0,
      average_num:0
    }
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getData()
  },
  getData() {
    let json = {};
    if (this.data.active !== 0) {
      json.status = this.data.active == 1 ? 0 : 1;
    }
    app._getNetWork({
      url: app.getNetAddresss('plugin.sign-buy.frontend.my-team.index'),
      success: resdata => {
        let {
          result,
          msg,
          data
        } = resdata.data;
        if (result == 0) return app.tips(msg);
        console.log(data)
        this.setData({
          deadline:data.deadline,
          child_num:data.child_num,
          settle_statistic:data.settle_statistic,
          performance_total:data.performance_total,
          stage_performance:data.stage_performance,
          people_num:data.people_num,
          valid_user_num:data.valid_user_num,
          is_admin:data.is_admin,
          activity : data.activity
        })
      }
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})